import request from '../utils/request';
import { remoteAddress } from './ip';

export async function fakeAccountLogin(params) {
  return request(remoteAddress('/user/login'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function fakeRegister(params) {
  return request(remoteAddress('/user/register'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function queryCurrent(params) {
  return request(remoteAddress('/user/getcurrent'),{
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function queryMenuList(params) {
  return request(remoteAddress('/user/getmenu'),{
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function editPassword(params) {
  return request(remoteAddress('/user/editpassword'),{
    method: 'POST',
    body: {
      ...params,
    },
  });
}